package forumSystem;

public enum Rank {
	MEMBER(1),MODERATOR(2),FORUMADMIN(3),SUPERADMIN(4);
	private int value;
	private Rank(int i)
	{
		value = i;
	}
	public static Rank get(int i)
	{
		return values()[i];
	}
	public int getValue()
	{
		return value;
	}
	
	public static Rank getRankByValue(int value)	{
		switch (value) {
		case 1:
			return MEMBER;
		case 2:
			return MODERATOR;
		case 3:
			return FORUMADMIN;
		case 4:
			return SUPERADMIN;
		default:
			return null;
		}
	}
}
